Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Finder Dialog Box Messages


GXInitializeStatusAlert

QuickDraw GX sends the GXInitializeStatusAlert message when a driver calls the GXAlertTheUser function with a status structure containing a status type of gxUserAlert. You need to override the GXInitializeStatusAlert message if you want to provide custom alerts. Your override of the GXInitializeStatusAlert message needs to be declared as follows.

OSErr MyInitializeStatusAlert (gxStatusRecord *statRecPtr,
                                 DialogPtr *dPtr);
statRecPtr
A pointer to the status structure.
dPtr
A pointer to the dialog box pointer.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
The default implementation of the GXInitializeStatusAlert message is the automatic handling of the standard printing ('plrt') alert boxes.

You do not need to override this message if your alert is one of the standard alerts for which QuickDraw GX provides automatic handling, as described in the chapter "Printer Drivers" in this book. If you want to provide custom alerts, first check the statusOwner field of the status structure to make sure that this message is intended for you. If so, perform a total override of this message. You must create a dialog box and return a pointer to it. You can call the GetNewDialog function for the specified alert and then perform any necessary dialog box initialization.

SPECIAL CONSIDERATIONS
You never send the GXInitializeStatusAlert message yourself.

If the statusOwner field of the status structure matches your signature, you perform a total override of the GXInitializeStatusAlert message. Otherwise, forward the message so that another message handler can respond to it.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
You can find an example of an overide of the GXInitializeStatusAlert message in Listing 3-17 on page 3-45 in the chapter "Printer Drivers."

The GXAlertTheUser function is described on page 5-18 in the chapter "Printing Functions for Message Overrides."

The GetNewDialog function is described in Inside Macintosh: Macintosh Toolbox Essentials.

The status structure is described on page 4-39.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help